import request from '@/utils/request'

export function add(data) {
  return request({
    url: '/api/productOutBoundOrder',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: '/api/productOutBoundOrder',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: '/api/productOutBoundOrder',
    method: 'put',
    data
  })
}

export function adjustAPI(data) {
  return request({
    url: 'api/outBoundOrder/adjustTheOrder',
    method: 'post',
    data
  })
}

export function queryInfoAPI() {
  return request({
    url: 'api/outBoundOrder/adjustList',
    method: 'get'
  })
}

// 执行出库单
export function executeOrderAPI(params) {
  return request({
    url: 'api/productOutBoundOrder/executeOutBound',
    method: 'get',
    params
  })
}

// 预约理货
export function appointmentTallyAPI(params) {
  return request({
    url: 'api/productOutBoundOrder/executeCargoHandling',
    method: 'get',
    params
  })
}

export function continuaOrderAPI(params) {
  return request({
    url: '/api/productOutBoundOrder/continueProductOutBoundTask',
    method: 'get',
    params
  })
}

export function pauseOrderAPI(params) {
  return request({
    url: '/api/productOutBoundOrder/stopProductOutBoundTask',
    method: 'get',
    params
  })
}

export default { add, edit, del }
